
//? 将数组内部的某一段元素复制到另一个指定的位置上，并返回修改后的数组

Array.prototype.myCopy2 = function (value, start = 0, end = this.length) {
    for (let i = start; i < end; i ++) {
        this[value] = this[i]
        value++
    }
    return this
}

const arr = [1, 2, 3, 10, 22, 6, 7]
// console.log(arr.myCopy2(1,3));
console.log(arr.copyWithin(1,3));
